-- GENERATED SPELL FOR [Sunfury Guardsman] --


function spell0_18850(pUnit, Event) --@Enrage,Self--
pUnit:FullCastSpellOnTarget(8599,pUnit)
pUnit:RegisterEvent('Sorts_18850', 536, 1)
end

function spell1_18850(pUnit, Event) --@Mark of the Sunfury,n/a--
pUnit:FullCastSpellOnTarget(35877,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18850', 20318, 1)
end

function Sorts_18850(pUnit, Event)
local choix_sorts_18850 = math.random(0, 1)
if choix_sorts_18850 == 0 then
pUnit:RegisterEvent('spell0_18850', 1, 1)
end
if choix_sorts_18850 == 1 then
pUnit:RegisterEvent('spell1_18850', 1, 1)
end
end

function mob18850_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_18850', math.random(1500, 3000), 1)
end

function mob18850_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18850_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18850_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(18850, 1, 'mob18850_Action')
RegisterUnitEvent(18850, 2, 'mob18850_Leave')
RegisterUnitEvent(18850, 3, 'mob18850_Kill')
RegisterUnitEvent(18850, 4, 'mob18850_Die')
